package com.pg.agent.engine.client.model;

import com.pg.agent.engine.client.model.llm.LLMCallInfo;
import com.pg.agent.engine.client.model.agent.AIAgent;
import com.pg.agent.engine.client.model.environment.AIEnvironment;
import com.pg.agent.engine.client.model.sop.AISOP;
import com.pg.agent.engine.client.model.state.AIState;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * 智能体会话执行对象
 *
 * @author huhuaping
 * @date 2023/11/20 10:25
 */
@Data
public class AIAgentSession {

    /**
     * 当前会话上下文环境
     */
    private AIEnvironment environment;
    /**
     * 当前会话的SOP
     */
    private AISOP sop;
    /**
     * 当前会话执行的state
     */
    private AIState state;
    /**
     * 当前会话执行的agent
     */
    private AIAgent agent;
    /**
     * 会话ID sessionId
     */
    private String sessionId;
    /**
     * 执行ID
     */
    private Integer exeId;

    private String userKey;
    /**
     * 本次会话执行，调用大模型日志
     */
    private List<LLMCallInfo> infoList = new ArrayList<>();

    public AIAgentSession(AIEnvironment environment, AISOP sop, String sessionId, Integer exeId) {
        this.environment = environment;
        this.sop = sop;
        this.sessionId = sessionId;
        this.exeId = exeId;
    }

    public AIAgentSession() {
    }
}
